package com.xiaoyu.merchant.loader;

import android.annotation.SuppressLint;
import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.xiaoyu.merchant.R;
import com.youth.banner.loader.ImageLoader;

public class StoreImageLoader extends ImageLoader {
    @SuppressLint("Range")
    @Override
    public void displayImage(Context context, Object imgModel, ImageView imageView) {
        //Glide 加载图片简单用法
        StoreCreBanModel banModel = (StoreCreBanModel) imgModel;
        if (banModel.getType() == 0) {
            Glide.with(context).load(banModel.getPath()).into(imageView);
        }
        if (banModel.getType() == 1) {
            imageView.setImageResource(R.mipmap.banner);
        }
    }
}
